#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int qishui(int  kong)
{
	double ping = 0;
	if (kong > 1)
	{
		int yu = kong % 2;
		kong = kong / 2.0;
		ping = yu + kong + qishui(kong);
	}
	return ping;
}
int main()
{
	int a =3;
	int b = 1.0;
	int  kong = a/b;
	int  sum = kong + qishui(kong) ;
	printf("%d\n", sum);
	
	return 0;
}